package com.ljkj.blockpay.model;

import android.icu.text.SimpleDateFormat;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;

/**
 * Created by yp on 2022/3/23
 */
public class TimeModel {
    String yearDay;
    private List<DataTimeModel> list;
    private boolean switchBoolean = false;

    public boolean isSwitchBoolean() {
        return switchBoolean;
    }

    public void setSwitchBoolean(boolean switchBoolean) {
        this.switchBoolean = switchBoolean;
    }

    public TimeModel() {
    }

    public TimeModel(String createTime) {
        if (createTime != null){
            long l = Long.valueOf(createTime);
            Date date = new Date(l);
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月");
            yearDay = sdf.format(date);
        }
    }
    public String getYearDay() {
        return yearDay;
    }

    public void setYearDay(String yearDay) {
        this.yearDay = yearDay;
    }


    public void addData(List<DataTimeModel> list2){
        this.list.addAll(list2 == null?new ArrayList<>():list2);
    }
    public List<DataTimeModel> getList() {
        return list;
    }

    public void setList(List<DataTimeModel> list) {
        this.list = list == null?new ArrayList<>():list;
    }
   public static class DataTimeModel{
        @SerializedName("orderId")
        private String orderId;
        @SerializedName("fromMe")
        private boolean fromMe;
        @SerializedName("headUrl")
        private String headUrl;
        @SerializedName("networkType")
        private String networkType;
        @SerializedName("originUserName")
        private Object originUserName;
        @SerializedName("originAccount")
        private Object originAccount;
        @SerializedName("originCurrency")
        private String originCurrency;
        @SerializedName("originAmount")
        private String originAmount;
        @SerializedName("originServiceAmount")
        private String originServiceAmount;
        @SerializedName("originActualAmount")
        private String originActualAmount;
        @SerializedName("exchangeRate")
        private String exchangeRate;
        @SerializedName("remark")
        private String remark;
        @SerializedName("targetCurrency")
        private String targetCurrency;
        @SerializedName("targetUserName")
        private Object targetUserName;
        @SerializedName("targetAccount")
        private Object targetAccount;
        @SerializedName("targetAddress")
        private String targetAddress;
        @SerializedName("targetAmount")
        private String targetAmount;
        @SerializedName("targetServiceAmount")
        private String targetServiceAmount;
        @SerializedName("targetActualAmount")
        private String targetActualAmount;
        @SerializedName("orderType")
        private int orderType;
        @SerializedName("orderStatus")
        private int orderStatus;
        @SerializedName("createTime")
        private String createTime;
        @SerializedName("exchangeRateDesc")
        private String exchangeRateDesc;

        public String getOrderId() {
            return orderId;
        }

        public void setOrderId(String orderId) {
            this.orderId = orderId;
        }

        public boolean isFromMe() {
            return fromMe;
        }

        public void setFromMe(boolean fromMe) {
            this.fromMe = fromMe;
        }

        public String getHeadUrl() {
            return headUrl;
        }

        public void setHeadUrl(String headUrl) {
            this.headUrl = headUrl;
        }

        public String getNetworkType() {
            return networkType;
        }

        public void setNetworkType(String networkType) {
            this.networkType = networkType;
        }

        public Object getOriginUserName() {
            return originUserName;
        }

        public void setOriginUserName(Object originUserName) {
            this.originUserName = originUserName;
        }

        public Object getOriginAccount() {
            return originAccount;
        }

        public void setOriginAccount(Object originAccount) {
            this.originAccount = originAccount;
        }

        public String getOriginCurrency() {
            return originCurrency;
        }

        public void setOriginCurrency(String originCurrency) {
            this.originCurrency = originCurrency;
        }

        public String getOriginAmount() {
            return originAmount;
        }

        public void setOriginAmount(String originAmount) {
            this.originAmount = originAmount;
        }

        public String getOriginServiceAmount() {
            return originServiceAmount;
        }

        public void setOriginServiceAmount(String originServiceAmount) {
            this.originServiceAmount = originServiceAmount;
        }

        public String getOriginActualAmount() {
            return originActualAmount;
        }

        public void setOriginActualAmount(String originActualAmount) {
            this.originActualAmount = originActualAmount;
        }

        public String getExchangeRate() {
            return exchangeRate;
        }

        public void setExchangeRate(String exchangeRate) {
            this.exchangeRate = exchangeRate;
        }

        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        public String getTargetCurrency() {
            return targetCurrency;
        }

        public void setTargetCurrency(String targetCurrency) {
            this.targetCurrency = targetCurrency;
        }

        public Object getTargetUserName() {
            return targetUserName;
        }

        public void setTargetUserName(Object targetUserName) {
            this.targetUserName = targetUserName;
        }

        public Object getTargetAccount() {
            return targetAccount;
        }

        public void setTargetAccount(Object targetAccount) {
            this.targetAccount = targetAccount;
        }

        public String getTargetAddress() {
            return targetAddress;
        }

        public void setTargetAddress(String targetAddress) {
            this.targetAddress = targetAddress;
        }

        public String getTargetAmount() {
            return targetAmount;
        }

        public void setTargetAmount(String targetAmount) {
            this.targetAmount = targetAmount;
        }

        public String getTargetServiceAmount() {
            return targetServiceAmount;
        }

        public void setTargetServiceAmount(String targetServiceAmount) {
            this.targetServiceAmount = targetServiceAmount;
        }

        public String getTargetActualAmount() {
            return targetActualAmount;
        }

        public void setTargetActualAmount(String targetActualAmount) {
            this.targetActualAmount = targetActualAmount;
        }

        public int getOrderType() {
            return orderType;
        }

        public void setOrderType(int orderType) {
            this.orderType = orderType;
        }

        public int getOrderStatus() {
            return orderStatus;
        }

        public void setOrderStatus(int orderStatus) {
            this.orderStatus = orderStatus;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getExchangeRateDesc() {
            return exchangeRateDesc;
        }

        public void setExchangeRateDesc(String exchangeRateDesc) {
            this.exchangeRateDesc = exchangeRateDesc;
        }

       @Override
       public String toString() {
           return "DataTimeModel{" +
                   "orderId='" + orderId + '\'' +
                   ", fromMe=" + fromMe +
                   ", headUrl='" + headUrl + '\'' +
                   ", networkType='" + networkType + '\'' +
                   ", originUserName=" + originUserName +
                   ", originAccount=" + originAccount +
                   ", originCurrency='" + originCurrency + '\'' +
                   ", originAmount='" + originAmount + '\'' +
                   ", originServiceAmount='" + originServiceAmount + '\'' +
                   ", originActualAmount='" + originActualAmount + '\'' +
                   ", exchangeRate='" + exchangeRate + '\'' +
                   ", remark='" + remark + '\'' +
                   ", targetCurrency='" + targetCurrency + '\'' +
                   ", targetUserName=" + targetUserName +
                   ", targetAccount=" + targetAccount +
                   ", targetAddress='" + targetAddress + '\'' +
                   ", targetAmount='" + targetAmount + '\'' +
                   ", targetServiceAmount='" + targetServiceAmount + '\'' +
                   ", targetActualAmount='" + targetActualAmount + '\'' +
                   ", orderType=" + orderType +
                   ", orderStatus=" + orderStatus +
                   ", createTime='" + createTime + '\'' +
                   ", exchangeRateDesc='" + exchangeRateDesc + '\'' +
                   '}';
       }
   }

}




